package com.ruoyi.pcj.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.mashuai.utils.toolkit.core.msHandlebean.annotation.MsJoinTable;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.pcj.constant.TbConstant;
import lombok.Data;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 聊天室-人员对象 pcj_chat_group_user
 *
 * @author ms
 * @date 2024-02-29
 */
@Data
@TableName("pcj_chat_group_user")
public class PcjChatGroupUser extends BaseEntity {
    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId
    @TableField("id")
    private String id;


    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableLogic
    @TableField("del_flag")
    private Integer delFlag;


    /**
     * 聊天室id
     */
    @TableField("group_id")
    private String groupId;


    /**
     * 用户id
     */
    @MsJoinTable(joinTable = TbConstant.sysUser,joinField = "user_id", needFields = {"nick_name@userName","phonenumber@userPhone"})
    @TableField("user_id")
    private Long userId;
    /**
     * 房主名称
     */
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userPhone;

    /**
     * 0-在线，1-退出房间，2-被房主拉黑，
     */
    @TableField("status")
    private String status;


    /**
     * 最新一次进入房间的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField("entry_time")
    private Date entryTime;


}
